#ifndef _KC_CONFIG_H__KC_
#define _KC_CONFIG_H__KC_

#include <string>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/thread/mutex.hpp>
#include "../logs/Logger.h"
#include "../filter/Rule.h"

namespace kc_sf
{
	enum SystemMode
	{
		Fast,
		DefaultMode = Fast,
		Safe
	};

	class Config : public boost::noncopyable
	{
		public:

			static Config & getInstance();
			~Config();

			int cMaxSessions;
			std::string cMyDomain;
			int cListenPort;
			int cSslListenPort;
			std::string cLogsFilepath;
			LogLevel cLogsLevel;
			unsigned long cMaxMessageSize; // w bitach
			SystemMode cMode;
			bool cCheckAntivir;
			std::string cSmtpServer;
			int cSmtpPort;
			Address cRedirectAddress;
			std::vector<Rule> cRules;

			const std::string & getPathToArchive() const;
			const std::string & getPathToQuarantine() const;
			const std::string & GetDatabaseName() const;
			const std::string & getDatabaseRootName() const;
			const std::string & getDatabaseRootPassword() const;

		private:

			static Config *c_instance;
			static boost::mutex c_guard;

			std::string c_path_to_archive;
			std::string c_path_to_quarantine;
			std::string c_db_name; // "kc_smtp"
			std::string c_db_root_name; // "root"
			std::string c_db_root_passwd; // "root" // w ldapie

			Config ();
	};
}

#endif // _KC_CONFIG_H__KC_
